<%@ Page Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true"
    CodeFile="PostRespose.aspx.cs" Inherits="Community_PostRespose" Title="Untitled Page" %>
<%@ Register Assembly="Manager" Namespace="PagingControl" TagPrefix="cc1" %>
<%@ Register Src="~/includes/Editor/Editor.ascx" TagName="BlogEditor" TagPrefix="Editor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainTable" runat="Server">
<script >
function CheckForumMessageIsBlank(txtdesc,lblmsg)
{ 
  if(document.getElementById(txtdesc).value=='')
    {               
    document.getElementById(lblmsg).innerHTML="Post Enter Message";        
    return false
    }    
}
</script>
            <div class="heading_inner">
        <div class="heading_topic">
            <h2><%=TopicName%></h2>
        </div>
    </div>

    <div class="cl"></div>

    <!--**Content 1 Starts Here**-->

    <div class="formnew_left" style="background-color: #f4f4f4;">
          <div style="width:98%;padding:1%;height:auto">
   <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">                                
                                <tr valign="top">
                                    <td colspan="2" align="left">
                                        <table width="100%" border="0"  cellspacing="2" cellpadding="0">                                            
                                            <tr style="height: 20px;">
                                                <td class="headernew" style="border-bottom: 1px solid #eaeaea; padding: 10px 0; height: 20px;"
                                                    colspan="4">                                                    
                                                           
                                                            <asp:Label ID="lblMessage"  Font-Size="11px" runat="Server" ForeColor="red" Font-Bold="true"></asp:Label>
                                                </td>                                                
                                            </tr>                                                                                                                                                                                 
                                            <tr style="height: 20px;">
                                                <td style="width: 640px">                                                    
                                                      <Editor:BlogEditor runat="server" ID="txtDescription"  Height="500"   Width="300"  IsHtmlEncodeDecode="true" />                                                        
                                                     </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 640px;float:right">                
                                                <asp:Button ID="btnSubmit" runat="server" CssClass="buttonclass" Text="Post Message" Font-Bold="true" 
                                                                   OnClick="btnSubmit_Click1" OnClientClick="updateRTE('txtDescription');" /> 
                                                </td>
                                            </tr>
                                            <tr>
                                                    <td>
                                                           <p>
                                                                        Note: Your posting can be viewed by anyone. | <a href="#">Posting guidelines </a>
                                                           </p> 
                                                    </td>
                                            </tr>
                                            <tr>
                                                <td style="border-bottom: 1px solid #eaeaea; padding: 10px 0; height: 20px;" colspan="4">
                                                    Show: <a href="<%=Session["strHttp"]%>Community/community.aspx">Recently active</a>  |<a href="<%=Session["strHttp"]%>User/MySupportGroup.aspx?GrpId=<%=Request.QueryString["Id"]%>">Add
                                                        to My Support Group</a> | <a href="<%=Session["strHttp"]%>Community/Forum.aspx?Id=<%=Request.QueryString["Id"]%>">
                                                            Back>></a><br>
                                                    <br>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="border-bottom: 1px solid #eaeaea; padding: 10px 0; height: 20px;" colspan="4">
                                                    <span><strong>
                                                        <%=Message%>
                                                    </strong></span>
                                                </td>
                                            </tr> 
                                                    
                                            <tr>
                                                    <td>
                                                        <asp:Repeater ID="rpQuestion" runat="Server">
                                                        <HeaderTemplate>
                                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <tr>
                                                                <td width="9%" valign="top" align="left" style="border-bottom: 1px solid #eaeaea;
                                                                    padding: 10px 0;">
                                                                    <img src="<%=Session["strHttp"]%>images/no-image.gif" alt="" width="40" height="50"></td>
                                                                <td width="78%" valign="top" style="border-bottom: 1px solid #eaeaea; padding: 10px 0;">
                                                                    <%# Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "msg").ToString())%>
                                                                    <br>
                                                                    <br>
                                                                        <%# Convert.ToInt32(Eval("daydiffer")) > Convert.ToInt32("1") ? "Posted on  " + "<b>" + ((System.Data.DataRowView)Container.DataItem)["PostedDate"] + "</b>" : " "%>
                                                                        <%# (Convert.ToInt32(Eval("daydiffer")) <= Convert.ToInt32("1")) && (Convert.ToInt32(Eval("hour")) < Convert.ToInt32("25")) && (Convert.ToInt32(Eval("hour")) != Convert.ToInt32("0")) ? "Posted about " + ((System.Data.DataRowView)Container.DataItem)["hour"] + " hour " + ((System.Data.DataRowView)Container.DataItem)["Minute"] + " minute ago " : " "%>                                                                                                                                                                                                                        
                                                                        <%# (Convert.ToInt32(Eval("daydiffer")) <= Convert.ToInt32("1")) && (Convert.ToInt32(Eval("hour")) == Convert.ToInt32("0")) && (Convert.ToInt32(Eval("Minute")) >= Convert.ToInt32("1")) ? "Posted about " + ((System.Data.DataRowView)Container.DataItem)["Minute"] + " minute ago " : " "%>
                                                                        <%# (Convert.ToInt32(Eval("daydiffer")) <= Convert.ToInt32("1")) && (Convert.ToInt32(Eval("hour")) == Convert.ToInt32("0")) && (Convert.ToInt32(Eval("Minute")) < Convert.ToInt32("1")) ? "Posted about " + ((System.Data.DataRowView)Container.DataItem)["Minute"] + " minute ago " : " "%>
                                                                                                                                                                                                                                                                                    
                                                                        by <b><%# ((System.Data.DataRowView)Container.DataItem)["username"]%></b>                                                                                                                                          
                                                                </td>
                                                            </tr>
                                                        </ItemTemplate>
                                                        <FooterTemplate>
                                                            </table>
                                                        </FooterTemplate>
                                                    </asp:Repeater>
                                                    </td>
                                            </tr>                                            
                                            <tr>
                                                <td height="35">
                                                    <cc1:Paging ID="pagingForum" runat="server" BindToControl="rpQuestion" OrderBy="Id"
                                                        StoredProcedureName="GetQuestionResponse" ResultsFormat="Displaying Question {0}-{1} (of {2})"
                                                        BackNextStyleClass="linkblue_12" ControlCssClass="normalgrey_12" PageNumbersCssClass="linkblue_12"
                                                        PageSize="5" Control_Type="Repeter" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" class="bodytxt" style="width: 516px; height: 8px;">
                                        <img src="../images/spacer.gif" alt="" width="8" height="8" /></td>
                                </tr>
                            </table>
              </div></div>
</asp:Content>
